import React from 'react'
import './login.css'
import { Button, Modal } from 'antd'

class Login extends React.Component {

  login = () => {
    window.localStorage.logined = '1'
    Modal.info({
      title: '提示',
      content: (
        <div>
          <p>登录成功</p>
        </div>
      ),
      onOk: () => {
        this.props.history.replace('/home')
      }
    })
  }

  render() {
    return (
      <div className="login">
        <Button onClick={ this.login }>登录</Button>
      </div>
    )
  }

}

export default Login